package string;
/** int length():获取字符串的长度(字符个数)*/
public class LegthDemo {
    public static void main(String[] args) {
        String str="我爱Java!";
        int len=str.length();
        System.out.println(len);//7
    }
}
